Upgrade clang-format to v22 and improve pylint pre-commit configuration#2813
Merged
antonwolfy merged 7 commits intomasterfrom Mar 18, 2026
Merged
Upgrade clang-format to v22 and improve pylint pre-commit configuration#2813antonwolfy merged 7 commits intomasterfrom
clang-format to v22 and improve pylint pre-commit configuration#2813antonwolfy merged 7 commits intomasterfrom
Conversation
…ecting C extension modules
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/index.html |
Contributor
|
Array API standard conformance tests for dpnp=0.20.0dev4=py313h509198e_15 ran successfully. |
Collaborator
vlad-perevezentsev
approved these changes
Mar 16, 2026
Contributor
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
LGTM
Thank you @antonwolfy
github-actions bot
added a commit
that referenced
this pull request
Mar 18, 2026
…ration (#2813) ## Summary - Migrate clang-format from `pocc/pre-commit-hooks` to `pre-commit/mirrors-clang-format` v22.1.0 - Update `.clang-format` config to maintain consistent code style across versions - Configure pylint to properly handle C extension modules (numpy, dpctl) - Remove manual clang-format-12 installation from GitHub workflow - Reformat all C++ files with clang-format v22 - Add reformatting commit to `.git-blame-ignore-revs` ## Changes ### Pre-commit configuration - Switch to `pre-commit/mirrors-clang-format` (v22.1.0) for better version pinning and consistency across environments - Add `--disable=c-extension-no-member` to pylint to avoid false positives on C extension objects ### Code style - Update `.clang-format`: Set `AfterControlStatement: Never` to preserve existing brace placement style - Reformat all C++ source files with clang-format v22 (net -159 lines due to template parameter formatting improvements) ### Pylint configuration - Add `extension-pkg-allow-list = ["numpy"]` to help pylint understand numpy better - Add `generated-members` patterns to handle dynamically created attributes on numpy types ### CI/CD - Remove obsolete `apt-get install clang-format-12` step from pre-commit workflow 21d5e1a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pocc/pre-commit-hookstopre-commit/mirrors-clang-formatv22.1.0.clang-formatconfig to maintain consistent code style across versions.git-blame-ignore-revsChanges
Pre-commit configuration
pre-commit/mirrors-clang-format(v22.1.0) for better version pinning and consistency across environments--disable=c-extension-no-memberto pylint to avoid false positives on C extension objectsCode style
.clang-format: SetAfterControlStatement: Neverto preserve existing brace placement stylePylint configuration
extension-pkg-allow-list = ["numpy"]to help pylint understand numpy bettergenerated-memberspatterns to handle dynamically created attributes on numpy typesCI/CD
apt-get install clang-format-12step from pre-commit workflow